package com.tenqian.crm.repository;

import com.tenqian.crm.domain.TqUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface TqUserRepository extends JpaRepository<TqUser, String>, JpaSpecificationExecutor<TqUser> {
    TqUser findByUsernameAndPassword(String username, String password);

    TqUser findByTelephone(String telephone);

    List<TqUser> findTop10ByNickNameLikeOrTelephone(String nickName, String telephone);

  /*  @Query("select new TqUser (username,nickName) from TqUser")
    List<TqUser> findUser();*/
}
